package com.ruoyi.common.domainenum;


import com.baomidou.mybatisplus.annotation.EnumValue;
import com.ruoyi.common.enumsupport.IBaseEnum;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 *
 */
public enum PfFileType implements IBaseEnum<String> {

    IMAGE("IMAGE", "图片","image"),
    VIDEO("VIDEO", "视频","video"),
    ;
    @EnumValue
    private final String value;
    private final String description;
    private final String descriptionEn;

    PfFileType(String value, String description, String descriptionEn) {
        this.value = value;
        this.description = description;
        this.descriptionEn = descriptionEn;

    }

    @Override
    public String getValue() {
        return this.value;
    }

    @Override
    public String getDescription() {
        return description;
    }

    public String getDescriptionEn() {
        return descriptionEn;
    }

    @Override
    public List<Map<String, String>> buildEnumMap() {
        List<Map<String, String>> result = new ArrayList<>();
        for (PfFileType valueType : PfFileType.values()) {
            Map<String, String> map = new HashMap<>();
            map.put("name", valueType.getDescription());
            map.put("nameEn", valueType.getDescriptionEn());
            map.put("code", valueType.toString());
            result.add(map);
        }
        return result;
    }

}
